import { ipcRenderer } from "electron";
import { Config } from './storageUtils';

// 发送同步配置信息事件
function settingSyncConfigStoreEvent(config: Config) {
  ipcRenderer.send("sync-config-store-setting", config);
}

function mainSyncConfigStoreEvent(callback: (config: any) => void) {
  ipcRenderer.on("sync-config-store-main", (_event, config) => {
    callback(config);
  });
}

export {
  settingSyncConfigStoreEvent,
  mainSyncConfigStoreEvent,
}
